<%@ page contentType="text/html;charset=utf-8" 
	import="com.zh.UserBean,org.springframework.web.context.*,org.springframework.web.context.support.*,com.zh.Util,java.util.*,com.zh.User"
%>
<!html DOCTYPE >
  <head>
    <title>添加公告信息</title>
     <script language="JavaScript" src="script/com.js"></script>
     <script language="JavaScript">
       function check(){
         var message = document.all.message.value;
         var mestime= document.all.mestime.value;
       	 if(message.trim()==""){
		    alert("公告内容不能为空");
		    return;
		  }
		   if(mestime.trim()==""){
		    alert("公告时间不能为空");
		    return;
		  }
       	 document.all.ss.submit();
       }
     </script>
     <style>
	       table{
	         border-collapse:collapse;
	       }
	       table,tr,td {
	       
	       border:1px solid black;
	       }
	       .mima {
	       width:100%;
	       height:40px;
	       background-color:#ADD8E6;
	       }
	       .zi {
	       font-size:20px;
	       position:relative;
	       left:45%;
	       margin-left:-30px;
	       line-height:40px;
	       }
	</style>
  </head>
  <body >
 	<jsp:useBean id="userBean" class="com.zh.UserBean" scope="session"/>
	<div class="mima"><font class="zi">添加公告</font></div>
	<form action="SuperServlet" method="post" id="ss">
	<table width="80%" border="1" cellspacing="0" style="margin-left:150px;margin-top:15px">	
	  <tr >
	    <td align="right" width="40%" height="30px">公告内容:</td>
	    <td><input name="message" id="message" /></td>
	  </tr>
	  
	  <tr>
	  	<td align="right" height="30px">发布时间:</td>
	  	<td><input  type="date" name="mestime" id="mestime" /></td>
	  </tr>
	  
	   <tr height="30px" >
		   <td  colspan="2">
		   <div  style="position:relative;left:40%;">
		   <input type="button" value="提交" id="xg" onclick="JavaScript:check()" style="cursor:hand"/>
		   <input type="button" value="重置" id="cz" onclick="JavaScript:document.all.ss.reset()"  style="cursor:hand">
		   </div>
		   </td>
		 </tr>
	  
	</table>
	<input type="hidden" name="action" value="addm"/>
	
	
	</form>
  </body>
</html>